using UnityEngine;

public class CharracterManager : MonoBehaviour
{
	public Sprite[] sprS = new Sprite[5];

	public GameObject headpref;

	public Transform head;

	private void Awake()
	{
		head = base.transform.Find("head");
	}

	public void createCharractor(int index)
	{
		GameObject gameObject = UnityEngine.Object.Instantiate(headpref);
		gameObject.transform.parent = head;
		gameObject.transform.localPosition = Vector3.zero;
		gameObject.GetComponent<SpriteRenderer>().sprite = sprS[index];
	}
}
